var Index = {
    template: '#index',
    methods: {
        loginAction() {
            if (this.bean.name.isEmpty()) {
                $toast.show('请输入用户名')
                return
            }
            if (this.bean.pwd.isEmpty()) {
                $toast.show('请输入密码')
                return
            }
            $loading.show('登陆中..')
            login(this.bean.name, getMd5(this.bean.pwd), function(flag, bean) {
               
                if (flag) {
                    if (bean.examine == '通过') {
                        $.MdManager.loginDone(bean)
                        $router.replace('/main/home')
                        $toast.show("登录成功");
                    } else {
                        $toast.show("您的账号尚未审核通过");
                    }

                } else {
                    $toast.show("账户或密码错误");
                }
				setTimeout(function() {
					$loading.hide()
				}, 1500);
				
            })

        }
    },
    data() {
        return {
            bean: {
                name: '',
                pwd: ''
            },
            msg: '登录'
        }
    },
    mounted() {
       
       
    },
}